﻿// ***********************************************************************
// Assembly         : SgResearch.Core
// Author           : jean-francois LEQUEUX
// Created          : 04-19-2013
//
// Last Modified By : jean-francois LEQUEUX
// Last Modified On : 04-19-2013
// ***********************************************************************
// <copyright file="HiddenPropertyAttribute.cs" company="SOCIETE GENERALE">
//     Copyright (c) SOCIETE GENERALE. All rights reserved.
// </copyright>
// <summary>Attribute for property</summary>
// ***********************************************************************
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;

namespace MvcToolbox
{
    /// <summary>
    /// Class HiddenProperty Attribute
    /// </summary>
    [AttributeUsage(AttributeTargets.Property)]
    public class HiddenPropertyAttribute : MetadataAttribute
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="HiddenPropertyAttribute"/> class.
        /// </summary>
        public HiddenPropertyAttribute()
        {
        }

        /// <summary>
        /// Method for processing custom attribute data.
        /// </summary>
        /// <param name="modelMetaData">A ModelMetaData instance.</param>
        public override void Process(ModelMetadata modelMetaData)
        {
            modelMetaData.AdditionalValues.Add("HiddenPropertyAttribute", this);
        }
    }
}
